16. Video: Feature Scaling

Feature Scaling

Feature Scaling

For any machine learning algorithm that uses distances as a part of its optimization, it is important to scale your features.

You saw this earlier in regularized forms of regression like Ridge and Lasso, but it is also true for k-means. In future sections on PCA and ICA, feature scaling will again be important for the successful optimization of your machine learning algorithms.


Though there are a large number of ways that you can go about scaling your features, there are two ways that are most common:

  1. Normalizing or Max-Min Scaling - this type of scaling transforms variable values to between 0 and 1.
  2. Standardizing or Z-Score Scaling - this type of scaling transforms variable values so they have a mean of 0 and standard deviation of 1.

Let's look at a more concrete example of this, as well as see how to perform these operations in Python.